<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>
			后台管理
		</title>
		<link href="app/Admin/View/Index/css/bootstrap.min.css" rel="stylesheet">
		<link href="app/Admin/View/Index/font-awesome/css/font-awesome.css" rel="stylesheet">
		<link href="app/Admin/View/Index/css/plugins/iCheck/custom.css" rel="stylesheet">
		<link href="app/Admin/View/Index/css/animate.css" rel="stylesheet">
		<link href="app/Admin/View/Index/css/style.css" rel="stylesheet">
		<link rel="stylesheet" href="Public/org/goods.css"/>
		<link rel="stylesheet" href="Public/org/kindeditor/themes/default/default.css" />
		<script src="Public/org/kindeditor/kindeditor.js"></script>
		<script src="Public/org/kindeditor/lang/zh_CN.js"></script>
		
		<style type="text/css">
		*{
			padding: 0;
			margin: 0;
		}
		li{
			list-style: none;
		}
body {
	background: #F3F3F4;
}
.tab-pane,
.ecommerce {
	background: #F3F3F4;
}
.imge {
	width: 100px;
	height: 36px;
	float: left;
}
.fil {
	float: left;
	margin-top: 8px;
	margin-left: 10px;
}
.lg {
	margin-top: 4px;
}
</style>
	</head>
	<body>
		<div class="wrapper wrapper-content animated fadeInRight ecommerce">
			<div class="row">
				<div class="col-lg-12">
					<div class="tabs-container">
						<ul class="nav nav-tabs">
							<li class="active">
								<a data-toggle="tab" href="#tab-1" aria-expanded="true">
									添加商品
								</a>
							</li>
							<li class="">
								<a data-toggle="tab" href="#tab-2" aria-expanded="false">
									商品图集
								</a>
							</li>
							<li class="">
								<a data-toggle="tab" href="#tab-3" aria-expanded="false">
									商品属性
								</a>
							</li>
							<li class="">
								<a data-toggle="tab" href="#tab-4" aria-expanded="false">
									商品详情
								</a>
							</li>
						</ul>
						<form action="" method="post" enctype="multipart/form-data">
							<div class="tab-content">
								<div id="tab-1" class="tab-pane active">
									<div class="panel-body">
										<fieldset class="form-horizontal">
											<input type="hidden" name="goods_id" id="" value="{{$file['goods_id']}}" />
											<div class="form-group">
												<label class="col-sm-2 control-label">父级:</label>
												<div class="col-sm-4">
													<select class="form-control" name="cat_id">
														<?php foreach ($catData as $k =>$v):?>
														<option value="{{$v['cat_id']}}" <?php if($v['cat_id']==$file['cat_id']){?> selected <?php } ?> >
															{{$v['_name']}}
														</option>
														<?php endforeach ?>
													</select>
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label">商品名称:</label>
												<div class="col-sm-4">
													<input type="text" class="form-control" name="goods_name" value="{{$file['goods_name']}}" placeholder="">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label">货号:</label>
												<div class="col-sm-4">
													<input type="text" class="form-control" name="goods_sn" value="{{$file['goods_sn']}}" placeholder="">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label">单位:</label>
												<div class="col-sm-4">
													<input type="text" class="form-control" name="unit" value="{{$file['unit']}}" placeholder="">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label">品牌:</label>
												<div class="col-sm-4">
													<select class="form-control" name="brand_id">
														<?php foreach ($brandData as $k =>$v):?>
														<option value="{{$v['id']}}" <?php if($v['id']==$file['brand_id']){?> selected <?php } ?> >
															{{$v['name']}}
														</option>
														<?php endforeach ?>
													</select>
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label">点击数:</label>
												<div class="col-sm-4">
													<input type="text" class="form-control" name="click" value="{{$file['click']}}" placeholder="">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label">列表页图:</label>
												<div class="col-sm-5">
													<?php if($file['list_pic']){?>
													<img src="{{$file['list_pic']}}" class="imge"/>
													<input type="hidden" name="list_pic" value="{{$file['list_pic']}}" />
													<?php } ?>
													<input type="file" class="fil" name="list_pic" placeholder="">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label">缩略图:</label>
												<div class="col-sm-5">
													<?php if($file['thumb_pic']){?>
													<img src="{{$file['thumb_pic']}}" class="imge"/>
													<input type="hidden" name="thumb_pic" value="{{$file['thumb_pic']}}" />
													<?php } ?>
													<input type="file" class="fil" name="thumb_pic" placeholder="">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label">栏目关键词:</label>
												<div class="col-sm-4">
													<input type="text" class="form-control" name="keyword" value="{{$file['keyword']}}" placeholder="">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label">商品描述:</label>
												<div class="col-sm-4">
													<textarea name="description" class="form-control" style="height: 100px;resize: none;">{{$file['description']}}</textarea>																																																		
												</div>
											</div>
										</fieldset>
									</div>
						</form>
					</div>
					<div id="tab-2" class="tab-pane">
						<div class="panel-body">
							<fieldset class="form-horizontal">
								<div class="form-group col-sm-12">
									<ul>
										<?php foreach ($pics as $k=>$i):?>
										<li class="file" id="pic{{$i['id']}}" style="float: left;">
											<span class="corner"></span>
											<div class="" style="width: 150px;height: 150px;">
												<img src="{{$i['small_pic']}}" style="width: 150px;height: 150px;"/>
											</div>
											<span class="fa fa-times-circle close" onclick="delPic({{$i['id']}})"></span>
										</li>
										<?php endforeach ?>
									</ul>
									
								</div>
								<div class="form-group col-sm-12">
									<div class="col-sm-4">
										<table id="tbl">
											<tr>
												<td>
													<input type="file" name="pics[]" id="" value="" />
													<span  class="fa fa-plus-square-o" onclick="addPic(this)"></span>
												</td>
											</tr>
										</table>
									</div>
								</div>
								<!--<script>
									function delPic(id){
										alert({{$i['id']}});
									}
								</script>-->
							</fieldset>
						</div>
					</div>
					<div id="tab-3" class="tab-pane">
						<div class="panel-body">
							<div class="table-responsive">
								<table class="table table-stripped table-bordered">
									<thead>
										<tr>
											<th>
												Group
											</th>
											<th>
												Quantity
											</th>
										</tr>
									</thead>
									<tbody>
										<tr>
											<td>
												<input type="text" class="form-control" placeholder="10">
											</td>
											<td>
												<input type="text" class="form-control" placeholder="$10.00">
											</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
					</div>
					<div id="tab-4" class="tab-pane">
						<div class="panel-body">
							<div class="table-responsive">
								<table class="table table-bordered table-stripped">
									<tbody>
										<tr>
											<td class="td_01" style="vertical-align: middle;text-align: center;">
												商品详情
											</td>
											<td class="td_02">
												<textarea name="content" id="content" style="width: 700px;height: 300px;resize: none;"></textarea>																								
												<script>KindEditor.ready(function(K) {
														window.editor = K.create('#content');
													});
												</script>
											</td>
										</tr>
										<tr>
											<td class="td_01" style="vertical-align: middle;text-align: center;">
												售后服务
											</td>
											<td class="td_02">
												<textarea name="service" id="service" style="width: 700px;height: 300px;resize: none;"></textarea>																								
												<script>KindEditor.ready(function(K) {
														window.editor = K.create('#service');
													});
												</script>
											</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-4 col-sm-offset-2">
							<button class="btn btn-primary">
								提交
							</button>
						</div>
					</div>
				</div>
				</form>
			</div>
		</div>
		</div>
		</div>
		</div>
		<!-- Mainly scripts -->
		<script src="app/Admin/View/Index/js/jquery-2.1.1.js"></script>
		<script src="app/Admin/View/Index/js/bootstrap.min.js"></script>
		<script src="app/Admin/View/Index/js/plugins/metisMenu/jquery.metisMenu.js"></script>
		<script src="app/Admin/View/Index/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
		<!-- Peity -->
		<script src="app/Admin/View/Index/js/plugins/peity/jquery.peity.min.js"></script>
		<script src="Public/org/hdjs/hdjs.min.js"></script>
		<!-- Custom and plugin javascript -->
		<script src="app/Admin/View/Index/js/inspinia.js"></script>
		<script src="app/Admin/View/Index/js/plugins/pace/pace.min.js"></script>
		<!-- iCheck -->
		<script src="app/Admin/View/Index/js/plugins/iCheck/icheck.min.js"></script>
		<!-- Peity -->
		<script src="app/Admin/View/Index/js/demo/peity-demo.js"></script>
		<script src="js/plugins/iCheck/icheck.min.js"></script>
		<script src="Public/org/goods.js"></script>
		<script>$(document).ready(function() {
	$('.i-checks').iCheck({
		checkboxClass: 'icheckbox_square-green',
		radioClass: 'iradio_square-green',
	});
});</script>
		
	</body>
</html>
